/*—————————————————————————————————————————————————————————— menu导航栏组件ts接口 ——————————————————————————————————————————————————————————*/
import type { MenuProps } from 'antd'
import { UserMenu } from '@/utils/interface'
import { ItemType, MenuItemType } from 'antd/es/menu/hooks/useItems'

// 渲染成员接口
// --------------------------------------------------------------------------------------------------------
export type MenuItem = Required<MenuProps>['items'][number]

// 导航栏渲染成员函数接口
// --------------------------------------------------------------------------------------------------------
export interface getItemInterface {
  (
    label: React.ReactNode,
    key: React.Key,
    icon?: React.ReactNode,
    children?: MenuItem[],
    type?: 'group'
  ): MenuItem
}

// 导航栏成员抽象接口
// --------------------------------------------------------------------------------------------------------
export type combinationItemsType = ItemType<MenuItemType>

// 导航栏组合成员函数接口
// --------------------------------------------------------------------------------------------------------
export interface combinationItemsInterface {
  (items: Array<UserMenu>): combinationItemsType[]
}
